export const loginRules = {
  // 变量名字和要el-form-item的prop属性值要一致
  // trigger 用于指定触发校验的时机，blur 表示在输入框失去焦点时触发，change 表示在输入内容变化时触发
  // Type  类型  关于校验邮箱以及其他的时候 ELement 使用的是 async-validator  (https://github.com/yiminghe/async-validator)
  userName: [{
    required: true,
    message: '请输入账号',
    trigger: 'blur'
  }, // 正则校验  必须是字母或者数字
    {
      pattern: /^[a-zA-Z0-9]+$/,
        message: '账号必须是字母或数字',
          trigger: 'blur'
  },
{
  min: 5,
    max: 12,
      message: '账号长度在 5 到 12 个字符',
        trigger: 'blur'
}

  ],
  passWord: [{
    required: true,
    message: '请输入密码',
    trigger: 'blur'
  }, {
    pattern: /^[a-zA-Z0-9]+$/,
    message: '密码必须是字母或数字',
    trigger: 'blur'
  },
  {
    min: 5,
    max: 12,
    message: '密码长度在 5 到 12 个字符',
    trigger: 'blur'
  }

]
}
export const tableData = [
  { brands: "oppo", todayPurchases: 500, monthPurchases: 3500, totalPurchases: 22000 },
  { brands: "vivo", todayPurchases: 450, monthPurchases: 3200, totalPurchases: 18500 },
  { brands: "小米", todayPurchases: 380, monthPurchases: 2900, totalPurchases: 16800 },
  { brands: "华为", todayPurchases: 620, monthPurchases: 4100, totalPurchases: 25600 },
  { brands: "苹果", todayPurchases: 720, monthPurchases: 4800, totalPurchases: 31200 },
  { brands: "三星", todayPurchases: 340, monthPurchases: 2600, totalPurchases: 14300 }
];

export const experienceInfo = [
  { title: '今日新增用户', value: 99,icon:'User' },
  { title: '本月新增用户', value: 999 ,icon:'User'},
  { title: '今日新增面经', value: 99,icon:'User' },
  { title: '本月新增面经', value: 999,icon:'User' },
  { title: '总面经数', value: 9999,icon:'User' },
  { title: '总用户数', value: 99999,icon:'User' }
]
export const chartData = {
  title: {
    text: "今日品牌销售数据",
  },
  xAxis: {
    data: tableData.map((item) => item.brands),
  },
  yAxis: {
    type: "value",
  },
  series: [
    {
      data: tableData.map((item) => item.todayPurchases),
      type: "bar",
    },
  ],
};

export const mjDetailRules = {
  stem: [{ required: true, message: "请输入文章的标题", trigger: ["blur"] }],
  content: [{ required: true, message: "请输入文章的内容", trigger: ["blur"] }],
};
export const clientDataRules = {
  name: [{ required: true, message: "请输入姓名", trigger: ["blur"] }],
  gender: [{ required: true, message: "请选择性别", trigger: ["change"] }],
  address: [{ required: true, message: "请输入地址", trigger: ["blur"] }],
}

export const clientTableLabels = [
  {
    prop: "id",
    label: "ID",
  },
  {
    prop: "name",
    label: "姓名",
  },
  {
    prop: "gender",
    label: "性别",
  },
  {
    prop: "address",
    label: "地址",
  },
  {
    prop: "operation",
    label: "操作",
  }
]

export const clientData = {
  total: 15,
  rows: [
    {
      id: 1,
      name: "柳智敏 (Karina)",
      gender: "女",
      address: "韩国首尔"
    },
    {
      id: 2,
      name: "aespa - Winter",
      gender: "女",
      address: "韩国釜山"
    },
    {
      id: 3,
      name: "aespa - Giselle",
      gender: "女",
      address: "日本东京"
    },
    {
      id: 4,
      name: "aespa - Ningning",
      gender: "女",
      address: "中国哈尔滨"
    },
    {
      id: 5,
      name: "BLACKPINK - Jennie",
      gender: "女",
      address: "韩国首尔"
    },
    {
      id: 6,
      name: "BLACKPINK - Lisa",
      gender: "女",
      address: "泰国曼谷"
    },
    {
      id: 7,
      name: "BTS - 金泰亨",
      gender: "男",
      address: "韩国大邱"
    },
    {
      id: 8,
      name: "BTS - 田柾国",
      gender: "男",
      address: "韩国釜山"
    },
    {
      id: 9,
      name: "Taylor Swift",
      gender: "女",
      address: "美国纳什维尔"
    },
    {
      id: 10,
      name: "Ariana Grande",
      gender: "女",
      address: "美国博卡拉顿"
    },
    {
      id: 11,
      name: "NewJeans - Minji",
      gender: "女",
      address: "韩国江原道"
    },
    {
      id: 12,
      name: "IVE - 张元英",
      gender: "女",
      address: "韩国首尔"
    },
    {
      id: 13,
      name: "LE SSERAFIM - 宫胁咲良",
      gender: "女",
      address: "日本鹿儿岛"
    },
    {
      id: 14,
      name: "TWICE - 林娜琏",
      gender: "女",
      address: "韩国首尔"
    },
    {
      id: 15,
      name: "ITZY - 申留真",
      gender: "女",
      address: "韩国首尔"
    }
  ]
}
